package com.shangqing.system.droughtinformation.mapper;

import com.shangqing.system.droughtinformation.entity.City;
import com.shangqing.system.droughtinformation.entity.DroughtCity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DroughtCityMapper {
    @Select("select id,city,number,year,droughtgradeid from drought_city where year=#{year}")
    List<DroughtCity> getinfo(int year);

    @Select("select SUM(number) from drought_city")
    int getNumberSum();

    @Select("select * from sys_city where id=#{id}")
    City getAllCity(int id);
}
